// more annotations see https://www.npmjs.com/package/sequelize-typescript
import { Table, Column, Model, AllowNull, AutoIncrement, PrimaryKey, Comment, Unique, CreatedAt, UpdatedAt, DeletedAt, DataType, NotEmpty } from 'sequelize-typescript'
import { Optional } from 'sequelize';
import { swaggerClass, swaggerProperty } from 'koa-swagger-decorator';
export interface MyInfoAttributes {
    id?: number;
    createdAt?: Date;
    updatedAt?: Date;
    deletionDate?: Date;
    uName?: string;
    qq?: string;
    githubUrl?: string;
    content?: string;
}
export interface MyInfoCreationAttributes extends Optional<MyInfoAttributes, 'id'> { }
@swaggerClass()
@Table({
    tableName: 'myinfo'
})
export default class MyInfo extends Model<MyInfoAttributes, MyInfoCreationAttributes> {

    @swaggerProperty({
        type: 'number',
        required: false
    })
    @Comment('主键id')
    @AllowNull(false)
    @NotEmpty
    @AutoIncrement
    @PrimaryKey
    @Column({
        type: DataType.INTEGER
    })
    id?: number;

    @swaggerProperty({
        type: 'object',
        required: false
    })
    @Comment('创建时间')
    @CreatedAt
    @Column({
        type: DataType.DATE
    })
    createdAt?: Date;

    @swaggerProperty({
        type: 'object',
        required: false
    })
    @Comment('更新时间')
    @UpdatedAt
    @Column({
        type: DataType.DATE
    })
    updatedAt?: Date;

    @swaggerProperty({
        type: 'object',
        required: false
    })
    @Comment('删除时间')
    @DeletedAt
    @Column({
        type: DataType.DATE
    })
    deletionDate?: Date;

    @swaggerProperty({
        type: 'string',
        required: true
    })

    @Comment('博主名字')
    @Column({
        type: DataType.STRING
    })
    uName?: string;

    @swaggerProperty({
        type: 'string',
        required: false
    })
    @Comment('博主qq')
    @Column({
        type: DataType.STRING
    })
    qq?: string;

    @swaggerProperty({
        type: 'string',
        required: false
    })
    @Comment('博主github地址')
    @Column({
        type: DataType.STRING
    })
    githubUrl?: string;

    @swaggerProperty({
        type: 'string',
        required: false
    })
    @Comment('博主个人描述')
    @Column({
        type: DataType.STRING
    })
    content?: string;
}